import { request } from 'umi';





export async function queryEnergyAnalysis(params) {
  return request<API.RequestData>('/api/energy/analysis', {
    method: 'GET',
    params: {
      ...params,
    },
  });
}

export async function queryEnergyAnalysisenergyNum(params) {
  return request<API.RequestData>('/api/energy/analysis/energyNum', {
    method: 'GET',
    params: {
      ...params,
    },
  });
}


export async function queryArealistAndSet(params) {
  return request<API.RequestData>('/api/energy/arealistAndSet', {
    method: 'GET',
    params: {
      ...params,
    },
  });
}

export async function queryDevicelistAndSet(params) {
  return request<API.RequestData>('/api/energy/devicelistAndSet', {
    method: 'GET',
    params: {
      ...params,
    },
  });
}


export async function reportByArea(params) {
  return request<API.RequestData>('/api/energy/reportByArea', {
    method: 'GET',
    params: {
      ...params,
    },
  });
}

export async function reportByDevice(params) {
  return request<API.RequestData>('/api/energy/reportByDevice', {
    method: 'GET',
    params: {
      ...params,
    },
  });
}


export async function unitReport(params) {
  return request<API.RequestData>('/api/energy/unitReport', {
    method: 'GET',
    params: {
      ...params,
    },
  });
}


export async function queryEnergyAnalysisByType(params) {
  console.log(params)
  return request<API.RequestData>('/api/energy/analysisByType', {
    method: 'GET',
    params: {
      ...params,
    },
    requestType: 'form',
  });
}

